<form id="edit-member-form" method="post" action="detail-edit-function.php?sys_part=employee&nowpageid=<?echo $nowpageid?>" enctype="multipart/form-data" class="layui-form">



<div class="layui-form-item photo">
        <label class="layui-form-label">头像：</label>

        <? if ($employee['photo']) { ?>
            <img src="../../../../uploadfiles/<? echo $theme_folder ?>/<? echo $employee['photo'] ?>" width="100"
                style="border:solid 1px #ececec; background-color:#ececec"/>
        <? } else {
            echo "暂无资料";
        }
        ?>
    </div>

    <div class="layui-form-item layui-form-item photo">
    <label class="layui-form-label">上传文件：</label><input type="file" name="photo" onchange="fileChange(this);"/>
    <em class="explain">上传头像,建议尺寸300px*300px</em><br/><br/></div>   

    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-block">
            <input type="text" name="ai_name" required  lay-verify="required" placeholder="请输入名字" autocomplete="off" class="layui-input" value="<? echo $employee['name']?>">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
            <input type="radio" name="ai_gender" value="男" title="男"
                <? if($employee['gender']=="男"){echo "checked";} ?>
            >
            <input type="radio" name="ai_gender" value="女" title="女"
                <? if($employee['gender']=="女"){echo "checked";} ?>
            >
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">电话</label>
        <div class="layui-input-block">
            <input type="text" name="ai_phone" placeholder="请输入电话" autocomplete="off" class="layui-input" value="<? echo $employee['phone']?>">
        </div>
    </div>




        <div class="layui-form-item">
            <label class="layui-form-label">入职日期</label>
            <div class="layui-input-block">

                <input type="text" name="ai_applydate" id="date" autocomplete="off" class="layui-input laydate"
                       value="<? echo $employee['applydate']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
            </div>
        </div>



        <div class="layui-form-item">
            <label class="layui-form-label">离职日期</label>
            <div class="layui-input-block">

                <input type="text" name="ai_leavedate" id="date" autocomplete="off" class="layui-input laydate"  value="<? echo $employee['leavedate']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
            </div>
        </div>

        <?//
       $department_list=select_lines_all_items($table_Prefix."department","nid desc","","0");
       ?>

       <div class="layui-form-item">
           <label class="layui-form-label">部门</label>
           <div class="layui-input-block">
               <select name="ai_departmentid" >
                    <option value="">无</option>
                  <?for($i=0;$i<count($department_list);$i++){?>
                       <option value="<? echo $department_list[$i]['nid'] ?>" <?php if($employee['departmentid'] == $department_list[$i]['nid']){echo "selected";} ?>><? echo $department_list[$i]['name'] ?></option>
                  <? } ?>
               </select>
           </div>
       </div>


        <div class="layui-form-item">
            <label class="layui-form-label">岗位</label>
            <div class="layui-input-block">
                <input type="text" name="ai_position" placeholder="请输职员所在岗位" autocomplete="off" class="layui-input" value="<? echo $employee['position']?>">
            </div>
        </div>



    <div class="layui-form-item">
        <label class="layui-form-label">当前工资</label>
        <div class="layui-input-block">
            <input type="text" name="ai_salary" placeholder="请输入电话" autocomplete="off" class="layui-input" value="<? echo $employee['salary']?>">
        </div>
    </div>





    <div class="layui-form-item">
        <label class="layui-form-label">密码重置</label>
        <div class="layui-input-block">
            <input type="text" name="ai_password"  autocomplete="off" class="layui-input" >
            <div class="notice">如不需要重置密码，请勿填写内容</div>
        </div>
    </div>








        <div class="layui-form-item">
            <label class="layui-form-label">登陆权限</label>
            <div class="layui-input-block">

                <input type="radio" name="ai_authority" value="是" title="是"
                    <? if($employee['authority']=="是"){echo "checked";} ?>
                >
                <input type="radio" name="ai_authority" value="否" title="否"
                    <? if($employee['authority']=="否"){echo "checked";} ?>
                >
            </div>
        </div>





    <? if(in_array("admin",$quanxian)){?>
        <div class="layui-form-item">
            <label class="layui-form-label">系统权限</label>
            <div class="layui-input-block">

                <? $employee_quanxian=explode(",",$employee['quanxian']);?>

                <input type="checkbox" name="ai_quanxian[]" value="admin" title="管理员" <?if(in_array('admin',$employee_quanxian)){echo "checked";}?>>

                <?foreach ($plate as $k=>$v) {
                    if($v['status']=='public'){?>
                        <div>
                            <input type="checkbox" name="ai_quanxian[]" value="<?echo $k?>" title="<?echo $v['name']?>" <?if(in_array($k,$employee_quanxian)){echo "checked";}?>  >
                            ：
                            <?foreach ($v['permission'] as $k2=>$v2) {?>
                                <input type="checkbox" name="ai_quanxian[]" value="<?echo $v2?>" title="<?echo str_replace($v['name']."_","",$v2)?>" <?if(in_array($v2,$employee_quanxian)){echo "checked";}?>  >
                                <?;}?>

                        </div>
                    <?}?>
                <?}?>


            </div>
        </div>
    <?}?>



        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="radio" name="ai_status" value="在职" title="在职"
                    <? if($employee['status']=="在职"){echo "checked";} ?>
                >

                <input type="radio" name="ai_status" value="休假" title="休假"
                    <? if($employee['status']=="休假"){echo "checked";} ?>
                >

                <input type="radio" name="ai_status" value="辞职" title="辞职"
                    <? if($employee['status']=="辞职"){echo "checked";} ?>
                >
                <input type="radio" name="ai_status" value="辞退" title="辞退"
                    <? if($employee['status']=="辞退"){echo "checked";} ?>
                >


            </div>
        </div>





<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">工资</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" name="ai_salary" placeholder="请输入基本工资" autocomplete="off" class="layui-input" value="--><?// echo $employee['salary']?><!--">-->
<!--            </div>-->
<!--        </div>-->



        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea name="ai_remark" placeholder="备注" class="layui-textarea"><? echo $employee['remark']?></textarea>
            </div>
        </div>


    <input type="hidden" name="nid"        value="<? echo $employee['nid'] ?>">
    <input type="hidden" name="sys_part"   value="<? echo $_REQUEST['sys_part'] ?>">
    <input type="hidden" name="nowpageid"  value="<? echo $_REQUEST['nowpageid'] ?>"/>
    <input type="hidden" name="sortby"     value="<? echo $_REQUEST['sortby'] ?>"/>



    <div class="function">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
    
    
</form>